package com.zhang.zhangapp.bean.shop;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Administrator on 2018/4/10.
 */

public class Evaluate implements Parcelable {

    private String descr;
    private String nickname;
    private String ctime;
    private String photo;
    private String picurls;
    private String[] pics;

    protected Evaluate(Parcel in) {
        descr = in.readString();
        nickname = in.readString();
        ctime = in.readString();
        photo = in.readString();
        picurls = in.readString();
        pics = in.createStringArray();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(descr);
        dest.writeString(nickname);
        dest.writeString(ctime);
        dest.writeString(photo);
        dest.writeString(picurls);
        dest.writeStringArray(pics);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<Evaluate> CREATOR = new Creator<Evaluate>() {
        @Override
        public Evaluate createFromParcel(Parcel in) {
            return new Evaluate(in);
        }

        @Override
        public Evaluate[] newArray(int size) {
            return new Evaluate[size];
        }
    };

    public String getDescr() {
        return descr;
    }

    public void setDescr(String descr) {
        this.descr = descr;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getCtime() {
        return ctime;
    }

    public void setCtime(String ctime) {
        this.ctime = ctime;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public String getPicurls() {
        return picurls;
    }

    public void setPicurls(String picurls) {
        this.picurls = picurls;
    }

    public String[] getPics() {
        if (picurls != null && picurls.length() > 0) {
            pics = picurls.split(",");
        }
        return pics;
    }

    public void setPics(String[] pics) {
        this.pics = pics;
    }
}
